package com.scar1et.Prototype.resume;

/**
 * 简历
 * Created by scar1et on 15-11-18.
 */
public class Resume implements Cloneable {

    private PersonalInfo personalInfo;
    private WorkExperience workExperience;

    public PersonalInfo getPersonalInfo() {
        return personalInfo;
    }

    public void setPersonalInfo(PersonalInfo personalInfo) {
        this.personalInfo = personalInfo;
    }

    public WorkExperience getWorkExperience() {
        return workExperience;
    }

    public void setWorkExperience(WorkExperience workExperience) {
        this.workExperience = workExperience;
    }

    @Override
    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    public void display() {
        if (personalInfo == null) {
            System.out.println("请认真填写个人信息");
        } else {
            System.out.println(String.format("%s %s %s", personalInfo.getName(),
                    personalInfo.getSex(), personalInfo.getAge()));
        }
        if (workExperience == null) {
            System.out.println("请认真填写工作经历");
        } else {
            System.out.println(String.format("工作经历：%s %s", workExperience.getTimeArea(),
                    workExperience.getCompanyName()));
        }
    }
}
